package com.jc.ds.model;

import java.util.Date;

/**
 * xorder_return
 * @author 
 */
public class XorderReturn extends BaseValueObject {
    /**
     * id
     */
    private Long id;

    /**
     * 申请人姓名
     */
    private String applicantName;

    /**
     * 申请人联系电话
     */
    private String applicantPhone;

    /**
     * 售后申请Id
     */
    private String requestId;

    /**
     * 申请单Id
     */
    private String returnFromId;

    /**
     * 订单Id , xorder表主键
     */
    private Long orderId;

    /**
     * 渠道订单号Id
     */
    private String channelOrderId;

    /**
     * 退换货详细原因
     */
    private String reasonDesc;

    /**
     * 1——待审核 
2——待用户寄回 
3——用户已寄送 
4——退货成功 
5——客服审核不通过 
6——用户取消 
7——系统取消 
8——客服取消 
9——待客服确认 
11——客服拒绝
     */
    private String status;

    /**
     * 客服审核不通过原因
     */
    private String denyReason;

    /**
     * 是否到付 'Y' : 是 'N' : 否
     */
    private String isPay;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 修改时间
     */
    private Date updateTime;

    private String orderStr = null;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getApplicantName() {
        return applicantName;
    }

    public void setApplicantName(String applicantName) {
        this.applicantName = applicantName;
    }

    public String getApplicantPhone() {
        return applicantPhone;
    }

    public void setApplicantPhone(String applicantPhone) {
        this.applicantPhone = applicantPhone;
    }

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public String getReturnFromId() {
        return returnFromId;
    }

    public void setReturnFromId(String returnFromId) {
        this.returnFromId = returnFromId;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public String getChannelOrderId() {
        return channelOrderId;
    }

    public void setChannelOrderId(String channelOrderId) {
        this.channelOrderId = channelOrderId;
    }

    public String getReasonDesc() {
        return reasonDesc;
    }

    public void setReasonDesc(String reasonDesc) {
        this.reasonDesc = reasonDesc;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getDenyReason() {
        return denyReason;
    }

    public void setDenyReason(String denyReason) {
        this.denyReason = denyReason;
    }

    public String getIsPay() {
        return isPay;
    }

    public void setIsPay(String isPay) {
        this.isPay = isPay;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public void orderById(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by id asc";
            }else{
                this.orderStr = this.orderStr + ",id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by id desc";
            }else{
                this.orderStr = this.orderStr + ",id desc";
            }
        }
    }

    public void orderByApplicantName(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by applicant_name asc";
            }else{
                this.orderStr = this.orderStr + ",applicant_name asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by applicant_name desc";
            }else{
                this.orderStr = this.orderStr + ",applicant_name desc";
            }
        }
    }

    public void orderByApplicantPhone(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by applicant_phone asc";
            }else{
                this.orderStr = this.orderStr + ",applicant_phone asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by applicant_phone desc";
            }else{
                this.orderStr = this.orderStr + ",applicant_phone desc";
            }
        }
    }

    public void orderByRequestId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by request_id asc";
            }else{
                this.orderStr = this.orderStr + ",request_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by request_id desc";
            }else{
                this.orderStr = this.orderStr + ",request_id desc";
            }
        }
    }

    public void orderByReturnFromId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by return_from_id asc";
            }else{
                this.orderStr = this.orderStr + ",return_from_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by return_from_id desc";
            }else{
                this.orderStr = this.orderStr + ",return_from_id desc";
            }
        }
    }

    public void orderByOrderId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by order_id asc";
            }else{
                this.orderStr = this.orderStr + ",order_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by order_id desc";
            }else{
                this.orderStr = this.orderStr + ",order_id desc";
            }
        }
    }

    public void orderByChannelOrderId(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by channel_order_id asc";
            }else{
                this.orderStr = this.orderStr + ",channel_order_id asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by channel_order_id desc";
            }else{
                this.orderStr = this.orderStr + ",channel_order_id desc";
            }
        }
    }

    public void orderByReasonDesc(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by reason_desc asc";
            }else{
                this.orderStr = this.orderStr + ",reason_desc asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by reason_desc desc";
            }else{
                this.orderStr = this.orderStr + ",reason_desc desc";
            }
        }
    }

    public void orderByStatus(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by status asc";
            }else{
                this.orderStr = this.orderStr + ",status asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by status desc";
            }else{
                this.orderStr = this.orderStr + ",status desc";
            }
        }
    }

    public void orderByDenyReason(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by deny_reason asc";
            }else{
                this.orderStr = this.orderStr + ",deny_reason asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by deny_reason desc";
            }else{
                this.orderStr = this.orderStr + ",deny_reason desc";
            }
        }
    }

    public void orderByIsPay(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by is_pay asc";
            }else{
                this.orderStr = this.orderStr + ",is_pay asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by is_pay desc";
            }else{
                this.orderStr = this.orderStr + ",is_pay desc";
            }
        }
    }

    public void orderByCreateTime(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by create_time asc";
            }else{
                this.orderStr = this.orderStr + ",create_time asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by create_time desc";
            }else{
                this.orderStr = this.orderStr + ",create_time desc";
            }
        }
    }

    public void orderByUpdateTime(boolean isAsc) {
        if(isAsc){
            if(this.orderStr == null){
                this.orderStr = "order by update_time asc";
            }else{
                this.orderStr = this.orderStr + ",update_time asc";
            }
        }else{
            if(this.orderStr == null){
                this.orderStr = "order by update_time desc";
            }else{
                this.orderStr = this.orderStr + ",update_time desc";
            }
        }
    }
}